﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SpaceGame.Objects
{
    public class Player:BaseGameObject
    {
        // Клавиши
        public string Name;
        int Number;
        public string MoveLeft = "a";
        public string MoveRight = "d";
        public string MoveUp = "w";
        public string MoveDown = "s";
        public string Fire = "c";

        public void DoActionOnKeyPress(string keyCode)
        {
            if (keyCode == MoveLeft)
            {
                X = X - 15;
            }

            if (keyCode == MoveRight)
            {
                X = X + 15;
            }

            if (keyCode == MoveUp)
            {
                Y = Y + 15;
            }

            if (keyCode == MoveDown)
            {
                Y = Y - 15;
            }
        }
        public Player()
        {
            Image = new System.Drawing.Bitmap( SpaceGame.Properties.Resources.spaceship);
        }

        
    }
}
